import {createRouter, createWebHashHistory, createWebHistory} from "vue-router";
import Home from '../views/home.vue';

const routes = [
    {
        path: '/',
        name: 'home',
        component: Home
    },
    {
        path: '/about',
        name: 'about',
        component: () => import(/* webpackChunkName: "about" */ '../views/about.vue')
    },
    {
        path: '/product',
        name: 'product',
        component: () => import(/* webpackChunkName: "product" */ '../views/product/product.vue')
    },
    {
        path: '/scene',
        name: 'scene',
        component: () => import(/* webpackChunkName: "scene" */ '../views/scene.vue')
    },
    {
        path: '/demo',
        name: 'demo',
        component: () => import(/* webpackChunkName: "demo" */ '../views/demo/demo.vue')
    },
    {
        path: '/router-demo',
        name: 'router-demo',
        component: () => import(/* webpackChunkName: "router-demo" */ '../views/demo/router-demo/router-primary.vue')
    },
    {
        path: '/router-id/:id',
        name: 'router-id',
        component: () => import(/* webpackChunkName: "router-demo" */ '../views/demo/router-demo/router-id.vue')
    },
    {
        path: '/router-id',
        name: 'router-id2',
        component: () => import(/* webpackChunkName: "router-demo" */ '../views/demo/router-demo/router-id.vue')
    },
    {
        path: '/store-demo',
        name: 'store-demo',
        component: () => import(/* webpackChunkName: "store-demo" */ '../views/demo/store-demo/store01.vue')
    },
    {
        path: '/axios-demo',
        name: 'axios-demo',
        component: () => import(/* webpackChunkName: "axios-demo" */ '../views/demo/axios-demo/axios01.vue')
    },
    {
        path: '/loading-demo',
        name: 'loading-demo',
        component: () => import(/* webpackChunkName: "loading-demo" */ '../views/demo/loading-demo/loading01.vue')
    }
];

const router = createRouter({
    history: createWebHashHistory(),
    routes
});
export default router;
